package net.repchain.browser.service.impl;

import com.github.pagehelper.PageInfo;
import net.repchain.browser.common.MyPageHelper;
import net.repchain.browser.common.WebPageInfo;
import net.repchain.browser.entity.RepchainTransaction;
import net.repchain.browser.dao.RepchainTransactionDao;
import net.repchain.browser.service.RepchainTransactionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * (RepchainTransaction)表服务实现类
 *
 * @author lhc
 * @since 2023-11-21 14:26:46
 */
@Service("repchainTransactionService")
public class RepchainTransactionServiceImpl implements RepchainTransactionService {
    @Resource
    private RepchainTransactionDao repchainTransactionDao;

    @Override
    public PageInfo<RepchainTransaction> queryByPage(RepchainTransaction repchainTransaction, WebPageInfo webPageInfo) {
         MyPageHelper.<RepchainTransaction>start(webPageInfo);
        return new PageInfo<>(repchainTransactionDao.select(repchainTransaction));
    }

    @Override
    public RepchainTransaction queryById(Long id) {
        return repchainTransactionDao.selectByPrimaryKey(id);    }
}
